<?php
include '../configs/global.php';
//获取试题信息
$sql = "select subject,group_concat(fraction),count(fraction) as counts,FORMAT(avg(fraction),1) as avgs from achievement group by subject;";
$rows = $pdo->getAll($sql);

if (!$rows) { 

}

$subjects=array();
foreach ($rows as $key => $value) {
    $subjects[$value['subject']]=$value['avgs'];
}
// print_r($subjects);

include '../views/common/adminhead.html';
include '../views/canvasdata.html';
include '../views/common/adminfoot.html';
